#import "HazeWaffleCell.h"


@implementation HazeWaffleCell

- (instancetype)initWithFrame:(CGRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		//self.contentView.backgroundColor = UIColor.whiteColor;
	}
	return self;
}

- (void)setQuestGrinPathway:(HazeWaffleModel *)questGrinPathway {
	_questGrinPathway = questGrinPathway;

	//: 配置cell的UI

	self.xenonFlutterLabel.text = [questGrinPathway.nirvana stringValue];

	self.wandererUnveilLabel.text = [questGrinPathway.ideal stringValue];

}
//: 设置_xenonFlutterLabel的numberOfLines
- (NSInteger)hazeRadiateJelly:(NSInteger)idealVivid virtuousHeatwave:(NSString *)sereneQuake {
	NSInteger embarkQuaint = 7;
	if (embarkQuaint != -20 && embarkQuaint > 2294 && sereneQuake) {

		NSString *enigma = [NSString stringWithFormat:@"img_%ld", (long)embarkQuaint];
		if ([NSFileManager.defaultManager fileExistsAtPath:enigma] && [sereneQuake isEqualToString:enigma]) {
			UIImage *yearlingGlistenVivid = [UIImage imageWithContentsOfFile:enigma];
			if (yearlingGlistenVivid) return embarkQuaint;
		}
		return embarkQuaint * 89;
	}
	return embarkQuaint - 5;
}

- (UILabel *)xenonFlutterLabel {
	if (!_xenonFlutterLabel) {
	
        _xenonFlutterLabel = [UILabel new];
        _xenonFlutterLabel.text = @"label_1";
        _xenonFlutterLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
        _xenonFlutterLabel.textColor = [UIColor colorWithRed:148/255.0 green:132/255.0 blue:29/255.0 alpha:0.9];
        _xenonFlutterLabel.textAlignment = NSTextAlignmentRight;
        //: UILabel的骚操作 充数
        _xenonFlutterLabel.numberOfLines = [self hazeRadiateJelly:2 virtuousHeatwave:@"tonicWhimsy"];
	}
	return _xenonFlutterLabel;
}

//: archive 的点击事件
- (void)action_3 {}

//: _riddleButton 的点击事件
- (void)action_4 {}

- (UIButton *)riddleButton {
	if (!_riddleButton) {
	
        _riddleButton = [[UIButton alloc] init];
        UIImage *curious = [UIImage imageNamed:@"images/icon_4.png"];
        if (curious) {
	        [_riddleButton setImage:curious forState:UIControlStateNormal];
        }
        [_riddleButton setTitle:@"button_4" forState:UIControlStateNormal];
        [_riddleButton setTitle:@"button_selected_4" forState:UIControlStateSelected];
        [_riddleButton setTitleColor:[UIColor colorWithRed:236/255.0 green:23/255.0 blue:65/255.0 alpha:0.8] forState:UIControlStateNormal];
        [_riddleButton setTitleColor:[UIColor colorWithRed:88/255.0 green:170/255.0 blue:63/255.0 alpha:0.6] forState:UIControlStateSelected];
        [_riddleButton addTarget:self action:@selector(action_4) forControlEvents:UIControlEventTouchUpInside];
	}
	return _riddleButton;
}

- (void)oliveInspireYawnSetupViews {

    //: 描述_0
    self.kindredTextField = [[UITextField alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:self.kindredTextField];
	[self.kindredTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(169);
		make.height.mas_equalTo(63);
		make.top.equalTo(@(18));
	}];

	//: 描述_1
	[self.contentView addSubview:self.xenonFlutterLabel];
	[self.xenonFlutterLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(192);
		make.height.mas_equalTo(50);
		make.top.equalTo(@(24));
		make.bottom.equalTo(@(18));
	}];


    //: 描述_2
    UILabel *elevate = [[UILabel alloc] initWithFrame:CGRectZero];
    elevate.size = CGSizeMake(70, 128);
    elevate.left = 13;
    elevate.top = 42;
    elevate.text = @"label_2";
    elevate.font = [UIFont systemFontOfSize:18 weight:UIFontWeightBold];
    elevate.textColor = [UIColor colorWithRed:171/255.0 green:189/255.0 blue:36/255.0 alpha:0.6];
    elevate.textAlignment = NSTextAlignmentRight;
    elevate.numberOfLines = 0;
    self.wandererUnveilLabel = elevate;
    [self.contentView addSubview:elevate];


    //: 描述_3
    UIButton *archive = [[UIButton alloc] init];
    archive.frame = CGRectMake(42, 35, 56, 146);
    UIImage *vortexRadiateJourney = [UIImage imageNamed:@"images/icon_3.png"];
    if (vortexRadiateJourney) {
	    [archive setImage:vortexRadiateJourney forState:UIControlStateNormal];
    }
    [archive setTitle:@"button_3" forState:UIControlStateNormal];
    [archive setTitle:@"button_selected_3" forState:UIControlStateSelected];
    [archive setTitleColor:[UIColor colorWithRed:128/255.0 green:69/255.0 blue:190/255.0 alpha:0.7] forState:UIControlStateNormal];
    [archive setTitleColor:[UIColor colorWithRed:143/255.0 green:43/255.0 blue:28/255.0 alpha:0.9] forState:UIControlStateSelected];
    [archive addTarget:self action:@selector(action_3) forControlEvents:UIControlEventTouchUpInside];
    self.jeopardyUmbrellaBtn = archive;
    [self.contentView addSubview:archive];

	//: 描述_4
	[self.contentView addSubview:self.riddleButton];
	[self.riddleButton mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(128);
		make.height.mas_equalTo(175);
		make.top.equalTo(@(30));
		make.bottom.equalTo(@(23));
	}];


    //: 描述_5
    UITextField *invincibleDazzle = [[UITextField alloc] initWithFrame:CGRectZero];
    invincibleDazzle.size = CGSizeMake(100, 95);
    invincibleDazzle.left = 36;
    invincibleDazzle.top = 6;
    self.unwindHopeTextField = invincibleDazzle;
    [self.contentView addSubview:invincibleDazzle];
}


@end